import { constantRoutes } from '@/router/index'
const state = {
  router: []// 存放动态路由
}
const mutations = {
  setRoutes(state, newroutes) {
    // 把静态路由和动态路由一起存到router里面
    state.router = ([...constantRoutes, ...newroutes])// newroutes里面存的时传过来的符合条件的路由信息otherRouters
  }
}
const actions = {

}
export default {
  namespaced: true,
  state,
  mutations,
  actions
}
